package com.you.atlas.web.place.module.screen;

import org.springframework.beans.factory.annotation.Autowired;

import com.alibaba.citrus.turbine.Context;
import com.alibaba.citrus.turbine.Navigator;
import com.alibaba.citrus.turbine.dataresolver.Param;
import com.you.atlas.biz.place.service.RateService;
import com.you.common.webx.AuthContext;

public class RateDelete {

    @Autowired
    private RateService rateService;

    public void execute(@Param("placeId") Long placeId, Context context, Navigator navigator) {

        rateService.deleteRate(AuthContext.getContext().getMemberId(), placeId);
        navigator.redirectTo("placeModule").withTarget("placeView.vm").uri().addQueryData("id", placeId);
    }
}
